package models;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import play.data.validation.Required;
import play.db.jpa.Model;
import utils.check.ConnectedUserAnno;

@Entity
public class Wanted extends Model {
    
	@Required
	@ConnectedUserAnno
	@ManyToOne//(fetch = FetchType.EAGER)
	public User user;
	
	@ManyToOne
	public Book book;
	
	@ManyToOne
	public Cartoon cartoon;
	
	@Required
	public Integer type; //PublicationTypeEnum - 1 book / 2 cartoon
}
